﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin.Master" AutoEventWireup="true" CodeBehind="buy_mile_list.aspx.cs" Inherits="LinkCard.AdminCP.GLP.buy_mile_list" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <script language="javascript">
        function setValue(page) {
            location.href = 'buy_mile_list.aspx?page=' + page;
        }
        function confirmAction() {
            if (confirm('Bạn thực sự muốn thực hiện thao tác này ???')) {
                // you clicked the OK button.
                // you can allow the form to post the data.
                return true;
            }
            else {
                // you clicked the Cancel button.
                // you can disallow the form submission.
                return false;
            }
        }
        var $j = jQuery.noConflict(); //set no conflict so you can use with MS AJAX.


        $j(document).ready(function () {
            $j("#<%=FromDate.ClientID %>").datepicker();
            $j("#<%=ToDate.ClientID %>").datepicker();
            //$("#datepicker").datepicker();
        });

    </script>
    <section id="content">
        <section class="container_12 clearfix">
            <section id="main" class="grid_12">
                <article>
                    <div class="h1">Danh sách mua dặm</div>
                    <div class="box search">
                        Từ ngày&nbsp;
           <%-- <input type="text"  size="25" id="FromDate" runat="server" />--%>
                        <input type="text" id="FromDate" runat="server">
                        &nbsp;&nbsp;&nbsp;Đến ngày&nbsp; 
       <%--  <input type="text"  size="25" id="ToDate" runat="server" />--%>
                        <input type="text" id="ToDate" runat="server">
                        &nbsp;&nbsp;&nbsp;Mã thẻ&nbsp; 
           <input type="text" id="txtCardNumber" runat="server">
                        <asp:Button ID="btnSearch" class="button small" Style="width: 60px;"
                            runat="server" Text="Tìm kiếm" OnClick="btnSearch_Click" />

                    </div>
                    <table id="table1" class="gtable sortable">
                        <thead>
                            <tr>
                                <th>
                                    <input type="checkbox" class="checkall" /></th>
                                <th>Ngày</th>
                                <th style="text-align: right">Khách hàng</th>
                                <th style="text-align: right">Số thẻ</th>
                                <th style="text-align: right">Tỉ lệ đổi điểm/dặm</th>
                                <th style="text-align: right">Version Tỉ lệ</th>
                                <th style="text-align: right">Số dặm mua</th>
                                <th style="text-align: right">Trạng thái</th>
                            </tr>
                        </thead>
                        <tbody>
                            <asp:Repeater ID="msgList" runat="server" OnItemDataBound="msgList_ItemDataBound">
                                <ItemTemplate>
                                    <tr>
                                        <td>
                                            <input type="checkbox" id="chkDuyet" runat="server" />
                                        </td>
                                        <td>
                                            <%# Convert.ToDateTime(DataBinder.Eval(Container.DataItem, "DateLog")).ToString("dd/MM/yyyy")%>
                                        </td>
                                         <td align="right">
                                            <%# DataBinder.Eval(Container.DataItem, "Fullname")%>
                                        </td>
                                         <td align="right">
                                            <%# DataBinder.Eval(Container.DataItem, "CardNumber")%>
                                        </td>
                                        <td align="right">
                                            <%# DataBinder.Eval(Container.DataItem, "PointToMile")%>
                                        </td>
                                        <td align="right">
                                            <%# DataBinder.Eval(Container.DataItem, "Version")%>
                                        </td>
                                        <td align="right">
                                            <%# LinkCard.AdminCP.Common.Utility.sDecimal(LinkCard.AdminCP.Common.ConvertUtility.ToDecimal(DataBinder.Eval(Container.DataItem, "MileToBuy")))%>
                                        </td>
                                        <td align="right">
                                            <label id="statusBuy" runat="server"></label>
                                             <img id="statusBuyImg" runat="server" />
                                        </td>
                                    </tr>
                                </ItemTemplate>
                            </asp:Repeater>
                            <tr id="msgNoData" runat="server">
                                <td colspan="4" align="center">Không có dữ liệu!
                                </td>
                            </tr>


                        </tbody>
                    </table>
                    <div class="tablefooter clearfix">
                        <div class="actions">
                            <select id="ActionOption" runat="server">
                                <option value="0">Xuất excel</option>
                                <option value="1">Duyệt</option>
                            </select>

                            <asp:Button ID="btnDuyet"
                                runat="server" Text="Thực hiện" class="button small"
                                Style="width: 80px;" OnClick="btnDuyet_Click" OnClientClick="javascript:return confirmAction();" />
                        </div>
                        <div class="pagination" id="divPager" runat="server">
                            <asp:Literal ID="PagerShow" runat="server"></asp:Literal>
                        </div>
                    </div>

                </article>
            </section>

        </section>
    </section>
</asp:Content>
